<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    const pc = ['海尔', '联想', '小米', '方正'];

    function getValue() {
      return [100, 60]
    }


    // 1. 变量多， 单元值少
    let arr = ['李成','邓超','吴彦祖','彭于晏']

    // let [a,b,c] = arr
    // console.log(a,b,c)
    // 2. 变量少， 单元值多
    // let arr1 = ['李成','邓超','吴彦祖','彭于晏']
    // let [a,b,c,d,e] = arr
    // console.log(a,b,c,d,e)
    // 3. 剩余参数 变量少， 单元值多
    // let arr1 = ['李成','邓超','吴彦祖','彭于晏']
    // let [a,b,...c] = arr
    // console.log(a,b,)
    // console.log(...c);
    // 4. 防止 undefined 传递
    let arr1 = []
    let [a = 0,b=0,c = 0] = arr
    console.log(a,b,c)
    // console.log(a,b,)
    // 5. 按需导入赋值

    // 6. 多维数组解构
  </script>


</body>

</html>